package com.tax.config.response;

/**
 * @author duandehui
 * @desc API 错误码
 *
 */
public enum ResponseCode {
	/* 正常响应 */
	OK(0, "ok"),
	SUCCESS(200, "ok"),
	PARA_ERROR(400, "请求参数错误"),
	TOKEN_ERROR(402, "用户验证失败"),
	FORBIDDEN(403, "拒绝访问"),
	REG_CODE_ERROR(405, "验证码错误"),
	VIERFY_CODE_EXPIRE(406,"验证码无效"),
	/* 系统内部错误  */
	SYSTEM_ERROR(500, "系统错误！"),
	SYSTEM_DATABASE(501, "数据库错误!"),

	PARAM_ERROR(1001, "参数校验失败!"),
	
	/* 业务错误  11000开始 ， 按业务模块分错误码  */
	USER_AUTH_FAILED(11000, "登录鉴权失败！"),
	WECHAT_CODE_INVAIL(10001, "临时登录凭证不可用,请稍后再试"),

	WECHAT_BIND_FAIL(10002, "微信绑定失败"),

	PLATFORM_KEY_INVAIL(10003, "appKey已失效"),

	PLATFORM_APPSECRET_INVAIL(10004, "appSecret错误"),

	PLATFORM_APPKEY_CONFIG_ERR(10005, "appKey配置错误"),

	TOKEN_INVAILD_ERROR(10006, "token无效"),
	;

	private Integer code;
	private String msg;
	
	ResponseCode(int code, String msg) {
		this.setCode(code);
		this.setMsg(msg);
	}

	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	} 
}
